/*---------------------------------------------------------------------------*\
|* This file is part of the koala project with MIT License.                  *|
|* Copyright (c) James <zhuguangxiang@gmail.com>                             *|
\*--------------------------------------------------------------------------**/

#ifndef _KOALA_IR_PRINTER_H_
#define _KOALA_IR_PRINTER_H_

#include "ir.h"

#ifdef __cplusplus
extern "C" {
#endif

/* print a function */
void klr_print_func(KlrFunc *func, FILE *fp);

/* print a module */
void klr_print_module(KlrModule *m, FILE *fp);

/* clang-format off */
/* dump a module to stdout */
#define klr_dump_module(m) klr_print_module(m, stdout); fflush(stdout)
/* clang-format on */

#ifdef __cplusplus
}
#endif

#endif /* _KOALA_IR_PRINTER_H_ */
